// create the main aardvark object
var aardvark = {
  resourcePrefix:"chrome://aardvark/content/",
  strings : {
    initialTipText : '',
    viewHtmlSource : '',
    javascriptDomCode : '',
    aardvarkKeystrokes : '',
    karmaticsPlug : '',
    ripHelp : '',
    wider : '',
    narrower : '',
    undo : '',
    quit : '',
    remove : '',
    kill : '',
    isolate : '',
    blackOnWhite : '',
    deWidthify : '',
    colorize : '',
    viewSource : '',
    javascript : '',
    paste : '',
    global : '',
    xPath : '',
    help : ''
    },
 
  //------------------------------------------------
  initializeExtension: function () {
    this.prefManager =
      Components.classes["@mozilla.org/preferences-service;1"]
      .getService(Components.interfaces.nsIPrefBranch);
    this.tipLastShown = this.prefManager.getIntPref(
      "extensions.aardvark@rob.brown.tipLastShown");
    var localizedStrings = Components.classes["@mozilla.org/intl/stringbundle;1"]
         .getService(Components.interfaces.nsIStringBundleService)
         .createBundle("chrome://aardvark/locale/aardvark.properties");
    for (var i in aardvark.strings) {
      aardvark.strings[i] = localizedStrings.GetStringFromName("extensions.aardvark@rob.brown." + i);
      }
    },

  //------------------------------------------------
  loadObject: function  (obj) {
    for (var x in obj) {
      if (aardvark[x] == undefined)
        aardvark[x] = obj[x];
      }
    }
};

aardvark.initializeExtension ();
